  <div class="editor-row">
    <div class="span2">
      <label class="small">Field</label>
      <input type="text" class="input-small" bs-typeahead="fields.list" ng-model="panel.field" ng-change="set_refresh(true)">
    </div>

    <div class="span2">
      <div class="editor-option">
        <label class="small">Chart value</label>
        <select ng-change="set_refresh(true)" class="input-small" ng-model="panel.mode" ng-options="f for f in ['count','mean','min','max','total']"></select>
      </div>
    </div>
    <div class="span2" ng-show="panel.mode != 'count'">
      <label class="small">Value Field <tip>This field must contain a numeric value</tip></label>
        <input ng-change="set_refresh(true)" placeholder="Start typing" bs-typeahead="fields.list" type="text" class="input-small" ng-model="panel.value_field">
    </div>
    <div class="span2">
      <label class="small">Time Ago</label>
      <input type="text" class="input-small" ng-model="panel.ago" ng-change="set_refresh(true)">
    </div>

  </div>

    <div class="editor-row">
    <div class="span2">
      <label class="small">Min Count</label>
      <input class="input-small" type="number" ng-model="panel.mincount" ng-change="set_refresh(true)">
    </div>
    <div class="span2">
      <label class="small">Max Count</label>
      <input class="input-small" type="number" ng-model="panel.maxcount"  ng-change="set_refresh(true)"></input></span>
    </div>
    <div class="span2">
      <label class="small">Try Size</label>
      <input class="input-small" type="number" ng-model="panel.trysize"  ng-change="set_refresh(true)"></input></span>
    </div>
  </div>

  <div class="editor-row">
    <div class="span2">
      <label class="small">Length</label>
      <input class="input-small" type="number" ng-model="panel.size" ng-change="set_refresh(true)">
    </div>
    <div class="span3">
      <label class="small">Order</label>
      <!--<select class="input-medium" ng-model="panel.order" ng-options="f for f in [panel.mode,'reverse_'+panel.mode]" ng-change="set_refresh(true)"></select></span>-->
      <select class="input-medium" ng-model="panel.order" ng-options="f for f in ['asce','desc']" ng-change="set_refresh(true)"></select></span>
    </div>
  </div>
  <div class="editor-row">
    <div class="span2">
      <label class="small">Style</label>
      <select class="input-small" ng-model="panel.chart" ng-options="f for f in ['bar','table']"></select></span>
    </div>
    <div class="span2" ng-show="panel.chart == 'table'">
      <label class="small">Font Size</label>
      <select class="input-mini" ng-model="panel.style['font-size']" ng-options="f for f in ['7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></span>
    </div>
    <div class="span2" ng-show="panel.chart == 'bar' || panel.chart == 'pie'">
      <label class="small">Legend</label>
      <select class="input-small" ng-model="panel.counter_pos" ng-options="f for f in ['above','below','none']"></select></span>
    </div>
    <div class="span3" ng-show="panel.chart != 'table' && panel.counter_pos != 'none'">
      <label class="small" >Legend Format</label>
      <select class="input-small" ng-model="panel.arrangement" ng-options="f for f in ['horizontal','vertical']"></select></span>
    </div>
    <!--<div class="span1">-->
      <!--<label class="small">Missing</label><input type="checkbox" ng-model="panel.missing" ng-checked="panel.missing">-->
    <!--</div>-->
    <!--<div class="span1">-->
      <!--<label class="small">Other</label><input type="checkbox" ng-model="panel.other" ng-checked="panel.other">-->
    <!--</div>-->
    <div class="span1" ng-show="panel.chart == 'pie'">
      <label class="small">Donut</label><input type="checkbox" ng-model="panel.donut" ng-checked="panel.donut">
    </div>
    <div class="span1" ng-show="panel.chart == 'pie'">
      <label class="small">Tilt</label><input type="checkbox" ng-model="panel.tilt" ng-checked="panel.tilt">
    </div>
    <div class="span1" ng-show="panel.chart == 'pie'">
      <label class="small">Labels</label><input type="checkbox" ng-model="panel.labels" ng-checked="panel.labels">
    </div>
  </div>
